﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Topcoder
{
    namespace SRM530
    {
        class GogoXBallsAndBinsEasy
        {
            public static int solve(int[] input)
            {
                int res = 0;
                int len = input.Length;
                for (int i=0;i<len/2;i++)
                {
                    res += input[len-i-1] - input[i];
                }
                return res;
            }
        }

        // 1000 pts DIV 2
        // chưa hoàn thành
        class GogoXReimuHakurai
        {
            public static string[] c;
            public static int solve(string[] choices)
            { 
                c = choices;
                return count(0);
            }
            public static int count(int level)
            {
                if (level == c.Length - 1) return 1;
                else
                {
                    int res = 0;
                    for (int i = level +1; i < c.Length; i++)
                        if (c[level][i] == 'Y')
                        {
                            res += count(i);
                        }
                    return res;
                }
            }
        }
    }
}
